#include <stdio.h>

void InitList(DLinkNode *&L);		
void DestroyList(DLinkNode *&L);
void DispList(DLinkNode *L);
bool ListInsert(DLinkNode *&L,int i,ElemType e);
int Symm(DLinkNode *L);

int main()
{
	DLinkNode *h;
	ElemType e;
	InitList(h);
	int i=1;
	char ch;
	while((ch=getchar())!='\n')
	{
		ListInsert(h,i,ch);
		i++;
	}
	DispList(h);

	if(Symm(h)==1)
		printf("yes\n");
	else if (Symm(h)==0)printf("no\n");
	else printf("NULL\n");
	DestroyList(h);
	return 0;
}
int Symm(DLinkNode *L)
{
	int flag=1;
	DLinkNode *p=L->next;
	DLinkNode *q=L->prior;
	if(p==L)
	return -1;
	while(flag)
	{
		if(p->data!=q->data)
			flag=0;
		else
		{
			if(p==q||p==q->prior)break;
			q=q->prior;
			p=p->next;
		}
	}
	return flag;
}
void InitList(DLinkNode *&L)
{
	L=new  DLinkNode;
	L->next=L;
	L->prior=L;
}
void DestroyList(DLinkNode *&L)
{
	DLinkNode *p,*q;
	q = p = L->next;  
    while(p != L)  
    {  
        p = p->next;  
        delete q;  
        q = p;  
    }  
    delete L  ;
    L = NULL;  
}
bool ListInsert(DLinkNode *&L,int i,ElemType e)
{
	DLinkNode *p,*q;
	q=new DLinkNode;
	p=L;
	if(i<=0)return false;
	while(p->next!=L)
	 p=p->next;
	if(!p)return false;
	else
	{
	q->data=e;
	q->next=p->next;
	if(p->next)
	p->next->prior=q;
	q->prior=p;
	p->next=q;
	return true;
	}
	
}
void DispList(DLinkNode *L)
{
	DLinkNode *p=L->next;
 	while(p!=L)
 	{
 		printf("%c ",p->data);
 		p=p->next;
	 }
	 
	 printf("\n");
}
